<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta name="language" content="en" />      

        <link rel="stylesheet" type="text/css"
              href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css" />
        <link rel="stylesheet" type="text/css"
              href="<?php echo Yii::app()->request->baseUrl; ?>/css/bilyn.css" />
        <link rel="stylesheet" type="text/css"
              href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />

        <?php
        Yii::app()->getClientScript()->registerPackage('jquery');
        Yii::app()->bootstrap->register();
        ?>
        <title><?php echo CHtml::encode($this->pageTitle); ?></title>
        
    </head>
    <body style="background: url(<?php echo Yii::app()->request->baseUrl; ?>/images/cool-background.jpg)">   
        <script type="text/javascript">
            /*<![CDATA[*/
            jQuery(function ($) {
                var width = $(window).width();
                if (width < 950) {
                    //$('#page').css('width', width - 2 + 'px');
                }
                if (width > 767) {
                    $('#column1-container').addClass('container');
                    $('#column1-content').addClass('span9');
                    //$('#main2-navbar').addClass('container');
                    //$('#page').css('width', width - 2 + 'px');
                    /*  $('#footer ').css("text-align","left");*/
                    //$("#div-main-logout").css('padding-left', width - 200 + 'px');
                    //$("#menu-bar-first-space").hide();
                }
            })
            /*]]>*/
        </script>
        <div>
            <div class="navbar navbar-static-top">
                <div class="navbar-inner">
                    <div id="main2-navbar"class="container">                 
                        <div style="margin-bottom: -5px"><a class="brand" href="<?php echo Yii::app()->request->baseUrl; ?>/index.php"> <img src="<?php echo Yii::app()->request->baseUrl; ?>/images/global.jpg" width="25" height="25"  class="img-rounded"> </img>比邻平台 </a></div>
                        <div class="nav-collapse collapse">
                            <ul class="nav" style="margin-top: 7px">
                                <?php if (Yii::app()->user->isGuest) { ?>
                                    <li id="menu-bar-first-space" class="" style="width: 100px">
                                        <a href="<?php echo Yii::app()->homeUrl; ?>"></a>
                                    </li>
    <!--                                    <li class="<? echo ($this->renderLogin ? 'active' : ''); ?>">
                                        <a href="javascript:void()"><?php echo Yii::t('site', 'Sign in'); ?></a>
                                    </li>
                                    <li class="<? echo (!$this->renderLogin ? 'active' : ''); ?>">
                                        <a href="javascript:void()"><?php echo Yii::t('site', 'Sign up'); ?></a>
                                    </li>-->
                                <?php } else { ?>
                                    <?php
                                    $appLinks = Blyn::app()->getAppUI()->getLinks(TRUE);
                                    $mainMenu = $appLinks['mainMenu'];
                                    //$mainMenu = Blyn::app()->getAppUI()->getMenu(BUIApp::MAINMENU);
                                    $items = $mainMenu;
                                    ?>
                                    <li class="active"><?php echo $items['mySpace']['ajaxUrl']; ?></li>
                                    <li class=""><?php echo $items['mySpaces']['ajaxUrl']; ?></li>
                                    <li class=""><?php echo $items['SpaceStore']['ajaxUrl']; ?></li>
                                    <li class="">
                                        <a href='<?php echo $items['logOut']['url']; ?>'><?php echo $items['logOut']['label']; ?></a>
                                    </li>                               
                                <?php } ?>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>            
        </div>

        <div style="margin-left: -19px;margin-right: -19px;">
            <?php echo $content; ?>  
        </div>
        <div id="footer" style="font-size: 14px;color: whitesmoke;">
            Copyright &copy;
            <?php echo date('Y'); ?>
            billyn.net is the property of Bieleen(Singapore) company.<br /> All Rights Reserved.<br />
        </div>
    </body>

</html>
